using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._NetworkDiagramTools._Configuration
{
    /// <summary>
    /// <para>Add Collapse Container By Attribute Rule</para>
    /// <para>Adds a diagram rule to the rule sequence specified on a diagram template to automatically collapse all contents related to containers during diagram building. The containers with contents to be collapsed are identified using an SQL query based on their attributes.</para>
    /// <para>将逻辑示意图规则添加到逻辑示意图模板上指定的规则序列中，以便在逻辑示意图构建过程中自动折叠与容器相关的所有内容。包含要折叠的内容的容器使用基于其属性的 SQL 查询进行标识。</para>
    /// </summary>    
    [DisplayName("Add Collapse Container By Attribute Rule")]
    public class AddCollapseContainerByAttributeRule : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public AddCollapseContainerByAttributeRule()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_utility_network">
        /// <para>Input Network</para>
        /// <para>The utility network or trace network containing the diagram template to modify.</para>
        /// <para>包含要修改的逻辑示意图模板的公共设施网络或追踪网络。</para>
        /// </param>
        /// <param name="_template_name">
        /// <para>Input Diagram Template</para>
        /// <para>The name of the diagram template to modify.</para>
        /// <para>要修改的逻辑示意图模板的名称。</para>
        /// </param>
        /// <param name="_is_active">
        /// <para>Active</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the rule will be active when generating and updating diagrams based on the specified template.
        ///   <bulletList>
        ///     <bullet_item>Checked—The added rule will become active during the generation and update of any diagrams based on the input template. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—The added rule will not become active during the generation or update of any diagrams based on the input template.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定在基于指定模板生成和更新关系图时，规则是否处于活动状态。
        ///   <bulletList>
        ///     <bullet_item>选中 - 在基于输入模板生成和更新任何逻辑示意图期间，添加的规则将变为活动状态。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>未选中 - 在基于输入模板生成或更新任何逻辑示意图期间，添加的规则将不会变为活动状态。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_container_source">
        /// <para>Container Source</para>
        /// <para>The container source class or object table that references the containers with the contents to be collapsed during the Collapse Container rule process.</para>
        /// <para>容器源类或对象表，用于引用容器，其中包含在“折叠容器”规则过程中要折叠的内容。</para>
        /// </param>
        public AddCollapseContainerByAttributeRule(object _in_utility_network, object _template_name, _is_active_value _is_active, object _container_source)
        {
            this._in_utility_network = _in_utility_network;
            this._template_name = _template_name;
            this._is_active = _is_active;
            this._container_source = _container_source;
        }
        public override string ToolboxName => "Network Diagram Tools";

        public override string ToolName => "Add Collapse Container By Attribute Rule";

        public override string CallName => "nd.AddCollapseContainerByAttributeRule";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_utility_network, _template_name, _is_active.GetGPValue(), _container_source, _where_clause, _description, _out_utility_network, _out_template_name, _reconnected_edges_option.GetGPValue()];

        /// <summary>
        /// <para>Input Network</para>
        /// <para>The utility network or trace network containing the diagram template to modify.</para>
        /// <para>包含要修改的逻辑示意图模板的公共设施网络或追踪网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Network")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_utility_network { get; set; }


        /// <summary>
        /// <para>Input Diagram Template</para>
        /// <para>The name of the diagram template to modify.</para>
        /// <para>要修改的逻辑示意图模板的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Diagram Template")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _template_name { get; set; }


        /// <summary>
        /// <para>Active</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the rule will be active when generating and updating diagrams based on the specified template.
        ///   <bulletList>
        ///     <bullet_item>Checked—The added rule will become active during the generation and update of any diagrams based on the input template. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—The added rule will not become active during the generation or update of any diagrams based on the input template.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定在基于指定模板生成和更新关系图时，规则是否处于活动状态。
        ///   <bulletList>
        ///     <bullet_item>选中 - 在基于输入模板生成和更新任何逻辑示意图期间，添加的规则将变为活动状态。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>未选中 - 在基于输入模板生成或更新任何逻辑示意图期间，添加的规则将不会变为活动状态。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Active")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _is_active_value _is_active { get; set; }

        public enum _is_active_value
        {
            /// <summary>
            /// <para>ACTIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ACTIVE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>INACTIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("INACTIVE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Container Source</para>
        /// <para>The container source class or object table that references the containers with the contents to be collapsed during the Collapse Container rule process.</para>
        /// <para>容器源类或对象表，用于引用容器，其中包含在“折叠容器”规则过程中要折叠的内容。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Container Source")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _container_source { get; set; }


        /// <summary>
        /// <para>Expression</para>
        /// <para>An SQL expression used to select the subset of containers in this source class or object table with the contents to be collapsed in the generated diagrams. For more information about SQL syntax, see SQL reference for query expressions used in ArcGIS.</para>
        /// <para>一个 SQL 表达式，用于选择此源类或对象表中的容器子集，其中包含要在生成的关系图中折叠的内容。有关 SQL 语法的详细信息，请参阅 ArcGIS 中使用的查询表达式的 SQL 参考。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Expression")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _where_clause { get; set; } = null;


        /// <summary>
        /// <para>Description</para>
        /// <para>The description of the rule.</para>
        /// <para>规则的说明。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Description")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _description { get; set; } = null;


        /// <summary>
        /// <para>Output Network</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Network")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_utility_network { get; set; }


        /// <summary>
        /// <para>Output Diagram Template</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Diagram Template")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_template_name { get; set; }


        /// <summary>
        /// <para>Aggregate reconnected edges</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the rule will aggregate the edges that are reconnected to the collapsed container junctions.
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Any edge connecting a content junction will be kept and reconnected to the collapsed container junction.  </bullet_item><para/>
        ///     <bullet_item>Checked—Any edge connecting a content junction will be replaced by a reduction edge that is reconnected to the collapsed container junction. Multiple edges between two collapsed junctions will be systematically aggregated under the same reduction edge. This is the default.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定规则是否聚合重新连接到折叠容器交汇点的边。
        ///   <bulletList>
        ///     <bullet_item>未选中 - 连接内容交汇点的任何边都将保留并重新连接到折叠的容器交汇点。</bullet_item><para/>
        ///     <bullet_item>选中 - 连接内容交汇点的任何边都将替换为重新连接到折叠容器交汇点的缩减边。两个折叠交汇点之间的多个边将系统地聚合在同一缩减边下。这是默认设置。 </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Aggregate reconnected edges")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _reconnected_edges_option_value _reconnected_edges_option { get; set; } = _reconnected_edges_option_value._true;

        public enum _reconnected_edges_option_value
        {
            /// <summary>
            /// <para>AGGREGATE_RECONNECTED_EDGES</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("AGGREGATE_RECONNECTED_EDGES")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>DONT_AGGREGATE_RECONNECTED_EDGES</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DONT_AGGREGATE_RECONNECTED_EDGES")]
            [GPEnumValue("false")]
            _false,

        }

        public AddCollapseContainerByAttributeRule SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}